<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>KidsTube</title>
	<link rel="stylesheet" href="framework/jquery.mobile-1.0rc3.min.css" />
	<link rel="stylesheet" href="css/style.css" />
	<script type="text/javascript" src="framework/jquery-1.5.min.js"></script>
	<script type="text/javascript" src="js/page_event.js"></script>
	<script type="text/javascript" src="framework/jquery.mobile-1.0rc3.min.js"></script>
	<script type="text/javascript" src="js/localstorage.js"></script>
	<script language="javascript">
	<!--
		
		function Init()
		{
			var strfav = localDatabase('getstr', 'fav_kidstube');

			if(strfav)
			{
				List(strfav);
			}
		}

		function List(str)
		{
			$list = $("#list");

			$.ajax(
			{
				type:'get',
				async:true,
				url:'http://www.kidstube.kr/plus/favorites_ajax.php?kt_no=' + str ,
				success:function(data)
				{
					var response = data.trim();

					if(response != "")
					{
						$(response).appendTo($list);
					}
				},
				error:function(data, status, err)
				{
				}

			});
		}

		function Favorite(obj)
		{
			var arrfav = localDatabase('get', 'fav_kidstube');

			for(i=0; i<arrfav.length; i++)
			{
				if(arrfav[i] == obj.id)
				{
					arrfav.splice(i, 1);
					localDatabase('set', 'fav_kidstube', arrfav);
				}
			}
			
			$(obj).parent().remove();			
		}
		
		function ReadCnt(kt_no)
		{
			$.ajax(
			{
				type:'get',
				async:true,
				url:'http://www.kidstube.kr/plus/read_cnt.php?kt_no=' + kt_no,
				success:function(data)
				{
				},
				error:function(data, status, err)
				{
				}
			});
		}
	-->
	</script>
</head>
<body>
	<div data-role="page" id="home">
		<!--<div class="lnb">
			<div class="title" id="title">Favorites</div>				
		</div>-->
		<div class="content" data-role="content">
			<ul class="ul_list" id="list">
			</ul>
			<div id="loading">
				<div id="load" style="display:none;"></div>
			</div>
		</div>
		<div class="content" data-role="content">
			<ul class="ul_list" id="list">
			</ul>
		</div>
	</div>
</body>
</html>
